package com.example.blog.mapper;

import com.example.blog.model.BlogInfo;
import com.example.blog.model.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    @Select("select * from user where delete_flag !=1 and user_name = #{userName}")
    UserInfo selectByName(String userName);

    @Select("select * from user where delete_flag !=1 and id = #{id}")
    UserInfo selectById(Integer id);
    @Insert("insert into user (user_name,password) values (#{userName},#{password})")
    Integer insertUserInfo(String userName,String password);
}
